#!/bin/sh
# This regression test is a part of SIPp.
# An ereg on a sent message after an <assignstr> searches the message
# sent, not the text the <assignstr> made.
. "`dirname "$0"`/../functions"; init

sippfg -sf uac.xml -i 127.0.0.1 -p 26081 -m 1 127.0.0.1:26080 \
    -timeout 2 -trace_err -trace_logs -log_file log.log >/dev/null 2>&1
status=$?
log=`cat log.log 2>/dev/null`
rm -f log.log uac_*_errors.log

if test $status -ne 0; then
    fail "exit status $status"
elif test "$log" != "text OPTIONS sip:service@127.0.0.1:26080"; then
    fail "logged '$log'"
else
    ok
fi
